package usgs.bip.swap.view;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

 

public class StateListHelper {


	private HashMap<String, String> stateList;

	
	public StateListHelper(){

		this.stateList = new HashMap<String, String>();

		stateList.put("Alabama", "AL");
		stateList.put("Alaska", "AK");
		stateList.put("Arizona", "AZ");
		stateList.put("Arkansas", "AR");
		stateList.put("California", "CA");
		stateList.put("Colorado", "CO");
		stateList.put("Connecticut", "CT");
		stateList.put("Delaware", "DE");
		stateList.put("Florida", "FL");
		stateList.put("Georgia", "GA");
		stateList.put("Hawaii", "HI");
		stateList.put("Idaho", "ID");
		stateList.put("Illinois", "IL");
		stateList.put("Indiana", "IN");
		stateList.put("Iowa", "IA");
		stateList.put("Kansas", "KS");
		stateList.put("Kentucky", "KY");
		stateList.put("Louisiana", "LA");
		stateList.put("Maine", "ME");
		stateList.put("Maryland", "MD");
		stateList.put("Massachusetts", "MA");
		stateList.put("Michigan", "MI");
		stateList.put("Minnesota", "MN");
		stateList.put("Mississippi", "MS");
		stateList.put("Missouri", "MO");
		stateList.put("Montana", "MT");
		stateList.put("Nebraska", "NE");
		stateList.put("Nevada", "NV");
		stateList.put("New Hampshire", "NH");
		stateList.put("New Jersey", "NJ");
		stateList.put("New Mexico", "NM");
		stateList.put("New York", "NY");
		stateList.put("North Carolina", "NC");
		stateList.put("North Dakota", "ND");
		stateList.put("Ohio", "OH");
		stateList.put("Oklahoma", "OK");
		stateList.put("Oregon", "OR");
		stateList.put("Pennsylvania", "PA");
		stateList.put("Rhode Island", "RI");
		stateList.put("South Carolina", "SC");
		stateList.put("South Dakota", "SD");
		stateList.put("Tennessee", "TN");
		stateList.put("Texas", "TX");
		stateList.put("Utah", "UT");
		stateList.put("Vermont", "VT");
		stateList.put("Virginia", "VA");
		stateList.put("Washington", "WA");
		stateList.put("West Virginia", "WV");
		stateList.put("Wisconsin", "WI");
		stateList.put("Wyoming", "WY");
		stateList.put("American Samoa", "AS");
		stateList.put("District of Columbia", "DC");
		stateList.put("Guam", "GU");
		stateList.put("Northern Mariana Islands", "MP");
		stateList.put("Puerto Rico", "PR");
		stateList.put("U.S. Virgin Islands", "VI");
		
	}

 
	/**
	 * @param stateList the stateList to set
	 */
	public void setStateList(HashMap<String, String> stateList) {
		this.stateList = stateList;
	}

	/**
	 * @return the stateList
	 */
	public HashMap<String, String> getStateList() {
		return stateList;
	}
	
	public String getStateAbbreviation(String state){
		
		String abbr = "";
		if(this.stateList.containsKey(state)){
			abbr = this.stateList.get(state);
		}
		
		return abbr;
		
	}
	
	public static List<String> getTerritories(){
		String[] territoriesStr =  {
				"American Samoa", 
				"District of Columbia", 
				"Guam",
				"Northern Mariana Islands",
				"Puerto Rico", 
				"U.S. Virgin Islands"};
		
		List<String> territories = Arrays.asList(territoriesStr);
		return territories;
	}
	
}
